package OOAE_UWE.Assessment;

public class OfflineState implements State {
    @Override
    public boolean canSwitch(State newState) {
        return (newState instanceof DirtyState);
    }

    @Override
    public boolean isAvailableForRent() {
        return false;
    }

    @Override
    public boolean equals(Object obj) {//自定义比较
        if (this == obj) return true;
        if (obj == null || getClass() != obj.getClass()) return false;
        return true;
    }

    @Override
    public String toString() {
        return "Offline";
    }
}
